eracefandomcom-20200213-history
D.A.L.E.
D.A.L.E. (Display Array of Light Emitters) is a 25x25 LED matrix. Goal To create a custom 2-D matrix of discrete LEDs. The matrix will be programmable and may serve as a platform for other eRACE projects. We hope to eventually extend the project by making the matrix interactive and allowing it to wirelessly communicate with other devices. Electronics ELECTRONICS DESCRIPTION We are using an Arduino Uno microcontroller board. The board has 12 I/O pins This is not enough to control 25 rows and 25 columns of LEDs, so we used 2 LED drivers to control the columns and 2 demultiplexers to control rows. The demux is a standard 4x16 demultiplexer with 4 inputs. The LED driver takes inputs, including the clock, and performs as a sink. Both the driver and demux have 16 outputs and perform basically the same function. We need two of each to control 25 outputs. Every column is connected to a 620 Ohm resistor to protect the LEDs and a PNP transistor to amplify the current. (Once finished constructing the circuit, we discovered that the source we were referencing was incorrect and all the transistors were reversed!) We originally included two trimpots hoping to control the brightness of all LEDs, but removed them after discovering tuning them had no visible effect and made the board too dim. The Uno is currently connected to a 6V power adaptor and 5V is applied to both the demux and driver. Our source for most of the design can be found at: http://www.evilmadscientist.com/article.php/peggy2 More information for other designs we considered can be found at the LED Matrix Project page. Hardware The LED board consists of 625 LEDs in a 25x25 square arrangement. Each row is connected to the long lead (anode) of the LED and each column is connected to the short lead (cathode). We used uninsulated wire to connect all the LEDs in a row or column. We wired every column, created an insulating layer with electrical tape, and wired the rows. The Uno board is drilled directly to the frame, which is made of wood, and a daughterboard contains all the other components. The daughterboard is currently unsecured. A sheet of Plexiglas is raised above the LED to protect the components. There is currently no protection on the back of the frame; we plan on adding either wood or another sheet of Plexiglas. Software Much of the software code is taken from a library provided for “Peggy 2”, our project source. All of that code is written in the Arduino language (similar to java) as a .pde file. Those files import a header file, Peggy2.h, to a C++ file containing basic functions, e.g. refresh, clear, light up point, or make line. //Excerpt from Peggy2.cpp // Turn a pixel on void Peggy2::SetPoint(uint8_t xPos, uint8_t yPos) { bufferyPos |= (uint32_t) 1 << xPos; } //Excerpt from peggy2_Line.pde #include ''' '''Peggy2 frame1; float angle=0,angleSpeed=PI/20; void loop() {''' '''angle += angleSpeed; if (angle>= TWO_PI) angle-=TWO_PI; frame1.Clear(); frame1.Line(12,12,int(12+12*cos(angle)),int(12+12*sin(angle))); frame1.RefreshAll(120); ' '} Unfortunately, while wiring the rows to the board, we accidentally reversed the wires going to the demux and thus all the patterns created by the library’s code are mirrored horizontally. So in order for us to render text properly, we first create a photoshop file with 25x25 pixels (the resolution of our board) and write our text in a clear font using the text tool and save it as a .gif. We could use any shape or image so long as it is 25x25 pixels. Then, we created a Java program that reads every pixel of that .gif and assigns it to a grayscale. Currently, it is only of integers (0-1). We then use the library provided to write each of those pixels with its given value. We should be able to easily alter this to provide more range in the scale. We also will find a way to render text in a faster, more efficient manner. Now that the hardware is mostly complete, we hope that we can continue to add on and improve D.A.L.E. through software. There are almost unlimited possibilities for different implementations. Next year, we hope there will be new members interested in the display and they will either get involved with other eRACE projects or continue working with D.A.L.E. to make it more versatile and attractive. In the future, we want to try connecting the Arduino to a small netbook so programs run faster, can be larger and hopefully establish some sort of wireless connection, perhaps by using WiFly Shield. We could stream news or campus events to the halls of the MSC. Ultimately, we would like to make D.A.L.E. interactive. It’s not too difficult to interface a PC with wireless remotes for the Nintendo Wii and one idea was to use those to play a game like pong. http://www.facebook.com/video/video.php?v=339457472782034